﻿#ifndef COLORCOMBOBOX_H
#define COLORCOMBOBOX_H
#include <QComboBox>

namespace Qly
{

class ColorComboBox : public QComboBox
{
    Q_OBJECT
public:
    ColorComboBox(QWidget * parent = 0);
    ~ColorComboBox();
    Qt::GlobalColor color();
    static QColor colorFromIndex(int idx);
    static int indexFromColor(QColor);
    void setColor(QColor cl);
signals:
    void colorChanged(Qt::GlobalColor color);
private slots:
    void onIndexChanged(int);

};

}
#endif // COLORCOMBOBOX_H
